<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Chat extends Model
{
    public $table = 'Chat';//表名
    protected $primaryKey = 'ID';//主键
    public $timestamps = false;//指定是否模型应该被戳记时间。
    protected $connection = 'qpRecord';


    public function accountInfo(){
        return $this->belongsTo('App\Models\AccountsInfo', 'SendUserID', 'UserID')->select('UserID' , 'GameID' ,'PlatformID' , 'NickName');
    }

    public function gameRoomInfo(){
        return $this->belongsTo('App\Models\GameRoomInfo', 'ServerID', 'ServerID')->select('ServerID' , 'ServerName');
    }
}
